
cassio:

Stuff to do before 0.2.0 release:

- Test every option. There are like 40 of them, so I can't test every
  possible combination of them in a reasonable time, but at least cover
  each one by itself and with a few others. Look for combinations that
  don't work together in the expected way, and either fix or disallow.

- Pretty up the web site some.

- See if I still have a freshmeat account, if not create one, post
  release there.

Stuff to do after 0.2.0 release:

- Code cleanups.
  The current code grew by accretion instead of being designed properly,
  so it's just ugly. Ideally I'd like to clean up the API and separate
  out the generic cassette support stuff into a library, which cassio
  would link with (and which would be clean and documented, suitable
  for anyone to link with in their own app).

- Ditch kcassio: it sucks. Write new GUI using GTK+ I think. Don't care
  about win32 GUI stuff so much, people are going to use APE on win32,
  no matter what I do (and I doubt I can do a nicer GUI than APE has).
  Actually, am thinking of a "tabbed" interface, with the playback
  tab looking a lot like APE's cassette playback (also there will be
  "record", "analyze", "edit" tabs I suppose). Either add a -G switch
  (GUI mode) to cassio, or librarify it so the CLI and GUI can link
  with the same set of support routines. (Update: this has been partly
  done)

- automake/autoconf maybe? It's a pain...

Portability Testing:

- Test on different Linux boxes, Ataris, and SIO2PC cables. See
  README_portability.txt for ongoing progess.

- Test on Free/Net/OpenBSD, MacOSX, Solaris, etc.

- Test -R mode with a real Atari tape deck!

Major feature upgrades:

- Find out how to set custom baud rates on OSes besides Linux and BSD.

- WIn32 port: find a way to avoid cassio.exe depending on cygwin1.dll
  compiling with this fails:
  CFLAGS="$(CFLAGS) -mno-cygwin"
  because without cygwin, there are no termios functions...
  proper way to fix this is to find out how to set baud rate and raw
  mode (if applicable) in the Win32 API
  also I think usleep() and select() are missing in that case
  (but win32 has timers and some non-blocking way to read the keyboard,
  should be easy, see SDL sources?)
  usleep() can be replaced with Sleep(), select() exists in win32
  (part of winsock).
  kbhit() can check for a keystroke, non-blocking
  Also, cas2wav and wav2cas won't link with -mno-cygwin, and I don't
  understand why (they were originally written for DOS, they're not
  Unix-ey, ?)
  Update: OK, I understand why they won't link now... MinGW can't
  use the stderr stream. It also lacks prototypes for the MSVC++
  _fdopen() and _open_osfhandle() functions, and the _O_TEXT constant,
  so the standard way of obtaining a usable stderr in the Win32 API
  doesn't work (I get output, but not unbuffered)!
  Update: cygwin1.dll can be stripped, so it's only 1.7 megs
  Update: "crosswin" with cygwin actually works on a real Windows machine!
  Still TODO is to investigate mingw further...


Future stuff

- Support Steve Tucker's new USB SIO2PC, when it comes out

- Support Kr0kti's new extended .cas format, when it comes out

- Support the ATART and/or AFMS board.
  Homepage at http://sdq.czweb.org/atari/projects/atart/
  There's DOS software, but no source.

  20070422 bkw: Hias pointed out that, on the ATART schematic, the motor
  control line from the Atari is *still* not connected to the PC serial
  port! One of the PC serial port lines *is* connected to motor control
  output (when in "1010-2-PC" ATART mode).

  The ATART is the same as an SIO2PC, plus the motor control line and
  an audio output jack. By itself it provides read-only tape support,
  withOUT motor control going to the PC. Used with an AFMS board it
  provides write support.

  Apparently the AFMS is a board that goes inside the 410/1010/XC12
  tape drive, and taps the output of the onboard D/A convertor to
  provide data output from the Atari rather than audio output, which
  would eliminate the need for wav2cas if cassio supported it.

  Also, the ATART is supposed to support "1010-2-PC" like operation: the
  ability to read data from the tape drive directly, without an Atari
  computer present at all (in this mode, it provides a motor control
  signal to the tape drive). Actually, a regular SIO2PC could do this
  too (with motor control limitation as always), but I can't really mess
  with it yet (no working tape drive yet). It *should* be as simple as
  reading the bytes as they come in over the serial line, but I'd have
  to force the tape drive to play in the absence of motor control (add
  an override switch to it?). Presumably the ATART wouldn't have this
  problem (it should be able to assert the motor control line as needed).

- See if someone who knows hardware can add the motor control line to
  one of the existing SIO2PC designs. Even just an LED that shows its
  state would be a vast improvement, but the coolest would be to hook
  it up to an unused serial port pin, for cassio to monitor. If so,
  it should work the same way as the ATART does. (Update: it can't,
  because the ATART doesn't actually do motor control in its SIO2PC mode!)


Blue-sky stuff (in no particular order):

- Custom SPAC record, to force the UART to hold TX at a space (0) for
  a while. This is needed for programs that want to sync to an audio
  track (e.g. Intro to Graphics tape). Use tcsendbreak(). (Normal PRWT
  holds the line at mark (1)). Unfortunately different OSes have varying
  semantics for setting the duration of tcsendbreak() (sometimes it's
  milliseconds, sometimes units of 1/4 to 1/2 seconds, sometimes it's
  completely ignored!)... fortunately this probably isn't time-critical.

- Some way to save options on a per-image basis? The .cas file spec
  says that applications should ignore records with unknown headers,
  so I could create a cassio-specific record type ("CEXT" maybe),
  and encode per-image settings in the aux and data areas. Ideally,
  the CEXT record should be handled by the prescanner, so it can come
  at the end of the file (so it can just be appended to an existing file).
  If I did create something like this, I wonder if anyone would ever
  actually use it...

- Invent a way to store audio in a .cas image, so cassio can play the
  audio channels of tapes like States & Capitals... timing and motor
  control will be the major problems with this. Timing might even be
  impossible to get right, if the user is using -f/-m/-b/-s/-l options.

- Write support. Should be possible to hook up the Atari's audio out
  (the one on the SIO port, or maybe the one on the monitor port?) to
  the PC's sound card. If so, cassio could record the audio (with
  warnings if the level is too high/low?) and create a .cas image by
  invoking wav2cas (or include code from wav2cas in cassio). So far,
  my experiments with this have yielded a bunch of horribly broken
  .cas files, but I'm hopeful...

  Also, it ought to be possible to build a custom ATART-like board that
  contains a D/A convertor (like the AFMS board, but not inside the tape
  drive).

  Update 20070418: monitor port audio CAN work with wav2cas, but it needs
  heavy preprocessing (tight bandpass filter) before wav2cas can do
  anything with it. Realtime support is right out.

- Custom tape handler for Atari OS that can read tape images from cassio
  at 19200 baud. This probably has to be an OS patch, to make boot tapes
  work properly. It *might* be possible to keep the loader in high RAM,
  since a lot of tapes don't need 48K of RAM (doing this would allow it
  to run on a 400/800). cassio should prepend a short boot segment to
  the tape that contains the handler, then switch to 19200 baud.

  The OS patch might be as simple as altering the baud correction tables,
  or it might be as complex as replacing all cassette-related code in the
  OS. Not sure yet. It would be cool to allow really short leader PRWT's
  in the OS (official OS code requires at least 9 sec of silence before
  first data record, would be cool to reduce this to 1-2 sec). It would
  also be cool to find out whether I can reduce the 250ms short IRG time.
  If all this turns out to be a possible, a 24K tape could load in under
  a minute rather than the 9 minutes it takes now!

  It may even be possible to use the SIO disk routines in the replacement
  handler (including the fast SIO in the Warp OS patch), which would make
  tapes load as fast as disks! How cool would *that* be?!

  Actually, I think it might be possible to do fast loads by ONLY
  patching the tape baud tables (at 60921, $EDF9 in the XL OS). Might
  also have to change the B600 high/low constants used to set the initial
  baud rate (embedded in code, not part of the table)?

wav2cas:

- Patch to support 48KHz sampling rate. Actually tried this without really
  knowing what I was doing, and of course it didn't work :)

- Test on Free/Net/OpenBSD, MacOSX, Solaris, etc.

- Test with .wav files recorded from real Atari cassettes.

- Better UNIXy porting: allow it to act as a filter, get rid of
  prompt if filename missing from CLI, etc.

cas2wav:

- Test on Free/Net/OpenBSD, MacOSX, Solaris, etc.

- Test output .wav files on real Atari cassette decks

- Better UNIXy porting: allow it to act as a filter, get rid of
  prompt if filename missing from CLI, etc.

xex2cas:

- Rewrite from scratch, in C, or else replace with a cassio option


other:

- Write a GUI frontend for cassio and friends. Would be cool to model
  the UI on a photo of a 410 or 1010.

- Write an interactive shell or perl script (using dialog?) to
  semi-automate the process of sampling/converting cassette audio.

- see if cassio can be ported to win32 via mingw or cygwin

- Write a GUI .cas editor, preferably one that works on both Linux and
  Windows (WxWindows widgets? C++ is a pain though... how well does
  GTK+ for Windows work?)

- Possibly move all the .cas handling code from cassio.c to a library?

- Find some willing victims^H^H^H^H^H^H^Hbeta testers :)

